﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace SIG.WebMVC
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapMvcAttributeRoutes();

            routes.MapRoute(
               "Blog",
               "Posts/{Page}",
               new { controller = "Posts", action = "Index", page = UrlParameter.Optional, },
              namespaces: new string[] { "SIG.WebMVC.Controllers" }
          );

            routes.MapRoute(
            "work7",
            "Work/solution-{sid}/type-{cid}/page-{page}",
            new { controller = "Work", action = "Index" },
            namespaces: new string[] { "SIG.WebMVC.Controllers" }
            );


            routes.MapRoute(
            "work5",
            "Work/solution-{sid}/type-{cid}",
            new { controller = "Work", action = "Index" },
            namespaces: new string[] { "SIG.WebMVC.Controllers" }
            );

            routes.MapRoute(
                "work4",
                 "Work/type-{cid}/page-{page}",
                  new { controller = "Work", action = "Index" },
                 namespaces: new string[] { "SIG.WebMVC.Controllers" }
             );

            routes.MapRoute(
                "work6",
                 "Work/solution-{sid}/page-{page}",
                  new { controller = "Work", action = "Index" },
                 namespaces: new string[] { "SIG.WebMVC.Controllers" }
             );


            routes.MapRoute(
               "work1",
                "Work/solution-{sid}",
                 new { controller = "Work", action = "Index" },
                namespaces: new string[] { "SIG.WebMVC.Controllers" }
            );

            routes.MapRoute(
              "work2",
                "Work/type-{cid}",
                new { controller = "Work", action = "Index" },
               namespaces: new string[] { "SIG.WebMVC.Controllers" }
           );
            routes.MapRoute(
              "work3",
               "Work/page-{page}",
                new { controller = "Work", action = "Index" },
               namespaces: new string[] { "SIG.WebMVC.Controllers" }
           );


            //routes.MapRoute(
            //    name: "PageRoute",
            //    url: "pages/{seoName}",
            //    defaults: new { controller = "Page", action = "DetailsSEO" },
            //    namespaces: new string[] { "SIG.WebMVC.Controllers" }
            //);


            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new string[] { "SIG.WebMVC.Controllers" }
            );


        }
    }
}
